package com.example.consulProvider.controller;


import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;



@RestController
public class ProviderController {
    @Resource
    RedisTemplate redisTemplate;
    @GetMapping("/pro-test")
    public String test(){
        final String key="service";

        redisTemplate.opsForValue().set(key,"http://127.0.0.1:8001/pro-test");
        Object value = redisTemplate.opsForValue().get(key);


        return "pro>>>"+value.toString();
    }
}
